import request from '@/utils/request'

const api = {
  page: '/user/permission/page',
  save: '/user/permission/save',
  remove: '/user/permission/remove'
}
function page (parameter) {
  return request({
    url: api.page,
    method: 'GET',
    params: parameter
  })
}
function save (data) {
  return request({
    url: api.save,
    method: 'POST',
    data: data
  })
}

function remove (id) {
  return request({
    url: api.remove,
    method: 'POST',
    params: {
      id
    },
    noToken: true
  })
}

export default {
  api,
  page,
  save,
  remove
}
